home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DemonicDefence3.swf / scripts / DefineButton2_1200 / BUTTONCONDACTION on(release).as next >
Encoding:
Text File  |  2005-09-27  |  306 b   |  17 lines

  1. on(release){
  2.    if(_root.money >= 50)
  3.    {
  4.       _root.money -= 50;
  5.       _root.castleHp += 15;
  6.       messo = "Got 15 HP!";
  7.       if(_root.castleHp > _root.castleMaxHp)
  8.       {
  9.          _root.castleHp = _root.castleMaxHp;
  10.       }
  11.    }
  12.    else
  13.    {
  14.       messo = "Not Enough Money!";
  15.    }
  16. }
  17.